package cn.edu.hust.sse.software7.class3.entities;

import java.io.Serializable;
import java.util.Date;

import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.IdentityType;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;

/**
 * This is the trading history of this eBusiness.
 * 
 * @author mason
 * 
 */
@PersistenceCapable(identityType=IdentityType.APPLICATION)
public class EBTrading implements Serializable{
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	@PrimaryKey
	@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
	private Long tradeId;
	@Persistent
	private Long productId;
	@Persistent
	private Long userId;
	@Persistent
	private Integer mount;
	@Persistent
	private Float totalPay;
	@Persistent
	private Date payTime;
	@Persistent
	private String receiverName;
	@Persistent
	private String receiverAddress;
	@Persistent
	private String receiverPostcode;
	@Persistent
	private String receiverPhone;

	public EBTrading(Long productId, Long userId, Integer mount,
			Float totalPay, Date payTime, String receiverName,
			String receiverAddress, String receiverPostcode,
			String receiverPhone) {
		super();
		this.productId = productId;
		this.userId = userId;
		this.mount = mount;
		this.totalPay = totalPay;
		this.payTime = payTime;
		this.receiverName = receiverName;
		this.receiverAddress = receiverAddress;
		this.receiverPostcode = receiverPostcode;
		this.receiverPhone = receiverPhone;
	}

	/**
	 * @return the productId
	 */
	public Long getProductId() {
		return productId;
	}

	/**
	 * @param productId the productId to set
	 */
	public void setProductId(Long productId) {
		this.productId = productId;
	}

	/**
	 * @return the userId
	 */
	public Long getUserId() {
		return userId;
	}

	/**
	 * @param userId the userId to set
	 */
	public void setUserId(Long userId) {
		this.userId = userId;
	}

	/**
	 * @return the mount
	 */
	public Integer getMount() {
		return mount;
	}

	/**
	 * @param mount the mount to set
	 */
	public void setMount(Integer mount) {
		this.mount = mount;
	}

	/**
	 * @return the totalPay
	 */
	public Float getTotalPay() {
		return totalPay;
	}

	/**
	 * @param totalPay the totalPay to set
	 */
	public void setTotalPay(Float totalPay) {
		this.totalPay = totalPay;
	}

	/**
	 * @return the payTime
	 */
	public Date getPayTime() {
		return payTime;
	}

	/**
	 * @param payTime the payTime to set
	 */
	public void setPayTime(Date payTime) {
		this.payTime = payTime;
	}

	/**
	 * @return the receiverName
	 */
	public String getReceiverName() {
		return receiverName;
	}

	/**
	 * @param receiverName the receiverName to set
	 */
	public void setReceiverName(String receiverName) {
		this.receiverName = receiverName;
	}

	/**
	 * @return the receiverAddress
	 */
	public String getReceiverAddress() {
		return receiverAddress;
	}

	/**
	 * @param receiverAddress the receiverAddress to set
	 */
	public void setReceiverAddress(String receiverAddress) {
		this.receiverAddress = receiverAddress;
	}

	/**
	 * @return the receiverPostcode
	 */
	public String getReceiverPostcode() {
		return receiverPostcode;
	}

	/**
	 * @param receiverPostcode the receiverPostcode to set
	 */
	public void setReceiverPostcode(String receiverPostcode) {
		this.receiverPostcode = receiverPostcode;
	}

	/**
	 * @return the receiverPhone
	 */
	public String getReceiverPhone() {
		return receiverPhone;
	}

	/**
	 * @param receiverPhone the receiverPhone to set
	 */
	public void setReceiverPhone(String receiverPhone) {
		this.receiverPhone = receiverPhone;
	}

	/**
	 * @return the tradeId
	 */
	public Long getTradeId() {
		return tradeId;
	}

}
